#! /bin/sh

# $Id: periodicCron.sh 214 2006-10-21 19:29:35Z gslin $

if [ -z "$1" ]; then
	exit;
fi

HOST=`hostname`
LOGGERPROG="/usr/bin/logger"
PERIODICTYPE="$1"

CRONPATH="/net/cron/${HOST}"

for FILE in ${CRONPATH}/*.${PERIODICTYPE}; do
	if [ -x ${FILE} ]; then
		${LOGGERPROG} -i -p cron.info "Run ${FILE} ${PERIODICTYPE}"
		${FILE} ${PERIODICTYPE}
	fi
done
